summarylogtreecommitdiffstats
path: root/api-token-in-passwd.patch
blob: 7301fad7554cd4944865f3dee89997b877981b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff -ur slack-libpurple/slack.c slack-libpurple.my/slack.c
--- slack-libpurple/slack.c	2018-04-11 14:25:26.285284792 +0300
+++ slack-libpurple.my/slack.c	2018-04-11 14:24:53.674286197 +0300
@@ -111,9 +111,12 @@
 		token = purple_account_get_password(account);
 	}
 	if (!token || !*token) {
-		purple_connection_error_reason(gc,
-			PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, "API token required");
-		return;
+		token = purple_account_get_password(account);
+		if (!token || !*token) {
+			purple_connection_error_reason(gc,
+				PURPLE_CONNECTION_ERROR_INVALID_SETTINGS, "API token required");
+			return;
+		}
 	}
 
 	SlackAccount *sa = g_new0(SlackAccount, 1);